import { Col, Descriptions, Row } from 'antd';
import _ from 'lodash';
import React from 'react';

// 本次编排版本
export default function ArrangeVersion({ data, handleJump }) {
  if (_.isEmpty(data)) return <></>;
  return (
    <div className="approve-box-content-paragraph">
      <div className="approve-box-content-paragraph-title">本次编排版本</div>
      <Row type="flex" justify="space-between" gutter={[50, 0]}>
        {_.map(data, item => (
          <Col span={8} key={item}>
            <Descriptions size="small" title="" bordered>
              <Descriptions.Item label={item.split(':')[0]}>
                <a onClick={handleJump}>{item.split(':')[1]}</a>
              </Descriptions.Item>
            </Descriptions>
          </Col>
        ))}
      </Row>
    </div>
  );
}
